package com.atiguigu.spring6.validator.three;

import com.atiguigu.spring6.validator.four.CannotBlack;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

public class User {

    @NotNull
    private String name;

    @NotNull
    @Min(value = 1)
    @Max(value = 200)
    private Integer age;

    @NotNull
    @Email
    private String email;

    @NotNull
    private String message;

    @CannotBlack
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
